Skip to content

fix: default explore/record output to ~/.opencli/ instead of cwd#720

Closed
Astro-Han wants to merge 7 commits intojackwener:mainfrom
Astro-Han:worktree-fix-711-default-output-dir
Closed

fix: default explore/record output to ~/.opencli/ instead of cwd#720
Astro-Han wants to merge 7 commits intojackwener:mainfrom
Astro-Han:worktree-fix-711-default-output-dir

Conversation

@Astro-Han
Copy link
Copy Markdown
Contributor

Description

explore and record wrote artifacts to .opencli/ relative to cwd, polluting project directories. This PR changes the default output to ~/.opencli/explore/<site>/ and ~/.opencli/record/<site>/, consistent with operate init writing to ~/.opencli/clis/.

Also adds --out <dir> option to explore (already existed on record), updates all documentation references, and improves resolveExploreDir error message for legacy artifact paths.

Related issue: #711

Type of Change

  • 🐛 Bug fix
  • 📝 Documentation

Checklist

  • I ran the checks relevant to this PR
  • I updated tests or docs if needed
  • I included output or screenshots when useful

Changes

File What
src/explore.ts Default outDir → ~/.opencli/explore/<site>/
src/record.ts Default outDir → ~/.opencli/record/<site>/
src/synthesize.ts resolveExploreDir checks ~/.opencli/ first, cwd fallback for legacy; improved error hint
src/cli.ts Add --out <dir> option to explore command
CLI-EXPLORER.md Update artifact path references
README.zh-CN.md Update artifact path references
docs/developer/ai-workflow.md Update artifact path references
skills/opencli-explorer/SKILL.md Update artifact path references
skills/opencli-usage/plugins.md Update artifact path references

Screenshots / Output

$ git diff main..HEAD --stat
 CLI-EXPLORER.md                  |  4 ++--
 README.zh-CN.md                  |  2 +-
 docs/developer/ai-workflow.md    |  2 +-
 skills/opencli-explorer/SKILL.md |  8 ++++----
 skills/opencli-usage/plugins.md  |  2 +-
 src/cli.ts                       |  2 ++
 src/explore.ts                   |  4 +++-
 src/record.ts                    |  4 +++-
 src/synthesize.ts                | 14 +++++++++++---
 9 files changed, 28 insertions(+), 14 deletions(-)

@jackwener jackwener force-pushed the worktree-fix-711-default-output-dir branch from 4bffa0e to e0990c4 Compare April 3, 2026 03:52
@Astro-Han Astro-Han force-pushed the worktree-fix-711-default-output-dir branch from 9fde0e8 to 5898ca6 Compare April 5, 2026 08:05
Astro-Han and others added 6 commits April 5, 2026 16:09
…kwener#711)

Previously `explore` and `record` wrote artifacts to `.opencli/` relative
to cwd, polluting project directories. Now they default to
`~/.opencli/explore/<site>/` and `~/.opencli/record/<site>/`, consistent
with `operate init` writing to `~/.opencli/clis/`.

Changes:
- explore: default outDir → ~/.opencli/explore/<site>/
- record: default outDir → ~/.opencli/record/<site>/
- synthesize: resolveExploreDir checks ~/.opencli/ first, cwd fallback
- cli: add --out <dir> option to explore command

Closes jackwener#711
Sync documentation with the new default output directory. Also improve
resolveExploreDir error message with a hint for legacy artifact paths.
@Astro-Han Astro-Han force-pushed the worktree-fix-711-default-output-dir branch from 5898ca6 to bafa89c Compare April 5, 2026 08:11
@jackwener
Copy link
Copy Markdown
Owner

Closing as stale against current main.

I re-checked the branch intent against the latest code, not just the PR title. This PR targets the removed top-level explore / record / synthesize implementation (src/explore.ts, src/record.ts, src/synthesize.ts), but those files no longer exist on current main, there is no matching command registration in src/cli.ts, and the current usage guidance explicitly marks opencli explore <url> / opencli record <url> as removed or superseded in skills/opencli-usage/SKILL.md.

Given that the underlying command surface has been consolidated away, this patch no longer applies meaningfully to the current tree. If we want the same path-default behavior for the newer browser/network capture flow, that should come as a fresh PR against the current implementation rather than reviving this one.

@jackwener jackwener closed this May 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants